<include file="public/head"/>
<include file="public/scripts"/>
<style type="text/css">
    .pic-list li {
        margin-bottom: 5px;
    }
    .form-control{
        width:25%;
    }
</style>
<body>
<div class="wrap js-check-wrap">
    <!--<ul class="nav nav-tabs">-->
        <!--<li><a href="{:cmf_plugin_url('QbtWxOs://AdminIndex/index')}">微信公众号信息</a></li>-->
        <!--<li class="active"><a href="{:cmf_plugin_url('QbtWxOs://AdminIndex/reply')}">公众号管理</a></li>-->
    <!--</ul>-->
    <!--<br>-->
    <!-- <ul class="nav nav-tabs">
        <li><a href="{:cmf_plugin_url('QbtWxOs://AdminIndex/reply')}">回复消息</a></li>
        <li><a href="{:cmf_plugin_url('QbtWxOs://AdminIndex/menu')}?id=0">自定义菜单</a></li>
        <li  class="active"><a href="{:cmf_plugin_url('QbtWxOs://AdminIndex/menu_list')}">个性义菜单</a></li>
    </ul>
    <br> -->
    <ul class="nav nav-tabs">
        <li><a href="{:cmf_plugin_url('QbtWxOs://AdminIndex/menu_list')}">个性菜单列表</a></li>
        <li class="active"><a href="javascript:;">编辑个性菜单栏</a></li>
    </ul>

    <form method="post" class=" form-horizontal  js-ajax-form margin-top-20" action="{:cmf_plugin_url('QbtWxOs://AdminIndex/adit_mat_menu_action')}">
        <div class="row">
            <div class="col-md-9">
                <table class="table table-bordered">
                    <tr>
                        <th>个性菜单名称：</th>
                        <td>
                            <input type="text" class="form-control" id="input-name" name="name" value="{$info.name}">
                        </td>
                    </tr>
                    <tr>
                        <th>性别：</th>
                        <td>
                            <input type="radio" name="sex" <if condition="$info.sex eq 1"> checked="checked"</if> value="1">男
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <input type="radio" name="sex" <if condition="$info.sex eq 2"> checked="checked"</if> value="2">女
                        </td>
                    </tr>
                    <tr>
                        <th>客户端版本：</th>
                        <td>
                            <input type="radio" name="os_type" <if condition="$info.os_type eq 1"> checked="checked"</if> value="1">苹果系统
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <input type="radio" name="os_type" <if condition="$info.os_type eq 2"> checked="checked"</if> value="2">安卓系统
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <input type="radio" name="os_type" <if condition="$info.os_type eq 3"> checked="checked"</if> value="3">其他系统
                        </td>
                    </tr>
                    <input type="hidden" name="id" value="{$info.id}">
                    <tr>
                        <th>国家：</th>
                        <td>
                            <select class="form-control" name="country" id="input-parent_id">
                                <option value="1">中国</option>

                            </select>
                        </td>
                    </tr>
                    <tr>
                        <th>省份：</th>
                        <td>
                            <select class="form-control" name="pid" id="provincial">
                                <option value="35">请选择</option>
                                <foreach name="p_list" item="vo">
                                    <option value="{$vo.pid}" <if condition="$info.pid eq $vo.pid"> selected="selected"</if> >{$vo.provincial}</option>
                                </foreach>
                            </select>
                        </td>
                    </tr>
                    <script>
                        $('#provincial').change(function(){
                            var pid = $("#provincial").val();
                            $.ajax({
                                type:'post',
                                url: "{:cmf_plugin_url('QbtWxOs://AdminIndex/get_city')}",
                                async: false,
                                data : {'pid':pid},
                                dataType: "json",
                                success: function (data) {
                                    $('#city').empty();
                                    if(data['status'] == 0){
                                        var str = '<option value="0">请选择</option>';
                                    }else{
                                        var count = data.length;
                                        var str = '';
                                        for(var i=0 ; i<count ; i++){
                                            str += '<option value="'+data[i]['cid']+'">'+data[i]['city']+'</option>';
                                        }
                                    }
                                    $('#city').append(str);
                                }
                            })
                        })
                    </script>
                    <tr>
                        <th>城市：</th>
                        <td>
                            <select class="form-control" name="cid" id="city">
                                <option value="0">请选择</option>
                                <foreach name="c_list" item="vo">
                                    <option value="{$vo.cid}" <if condition="$info.cid eq $vo.cid"> selected="selected"</if>>{$vo.city}</option>
                                </foreach>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <th>语言：</th>
                        <td>
                            <select class="form-control" name="lan" id="language">
                                <option value="">请选择</option>
                                <foreach name="l_list" item="vo" key="k">
                                    <option value="{$k}" <if condition="$info.lan eq $k"> selected="selected"</if>>{$vo}</option>
                                </foreach>
                            </select>
                        </td>
                    </tr>

                </table>
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-10">
                        <button type="submit" class="btn btn-primary js-ajax-submit">保存</button>
                        <a class="btn btn-default" href="javascript:history.back(-1)">{:lang('BACK')}</a>
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
<script type="text/javascript" src="__STATIC__/js/layer/layer.js"></script>
</body>
</html>
